<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>管理中心</title>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/css/main.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/jquery.js"></script>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/js/formValidator.jquery/style.css" />
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/formValidator.jquery/cn.js"></script>
<!--时间选择器-->
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/lang/cn_utf8.js"></script>
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar-setup.js"></script>
<link rel="stylesheet" href="<?php echo $this->baseUrl;?>/files/admin/js/date/calendar-blue.css" />
<!-- 刷新各个操作系统装机数-->
<script language="javascript" src="<?php echo $this->baseUrl;?>/files/admin/js/pushTask/changeInstallNum.js"></script>
</head>

<body>
    <div id="main">
        <div id="navigation">当前位置：<a href="<?php echo $this->projectUrl(array('controller'=>'push-task', 'action'=>'index'));?>">推送箱 </a>&gt; 推送信息</div>
<div id="body">
            <div id="edit">
                <form id="editForm" name="editForm" method="post" action="<?php echo $this->projectUrl();?>">
                    <table class="table">
                        <tr class="dataLine">
                            <td  height="26" width="350PX">选择平台：</td>
                            <td><label></label>
                              <label></label>&nbsp;
                            <label></label>
                            <table border="0">
                              <tr>
                                <td><label>
                                  <input name="osName[]" type="checkbox" id="osName[]" value="android" />
Andorid</label>
&nbsp;&nbsp;                             (<span id="andriodInstall"><?php echo $this->androidInstallTotal;?></span>)</td>
                                <td><label>
                                  <input name="osName[]" type="checkbox" id="osName[]" value="iphone" />
Iphone</label>
&nbsp;                               (<span id="iphoneInstall"><?php echo $this->iphoneInstallTotal;?></span>)</td>
                              </tr>
                              <tr>
                                <td><label>
                                  <input name="osName[]" type="checkbox" id="osName[]" value="ipad" />
Ipad</label>                                 (<span id="ipadInstall"><?php echo $this->ipadInstallTotal;?></span>)</td>
                                <td> WPhone7 
                               (0)</td>
                              </tr>
                          </table></td>
                      </tr>
                        <tr class="dataLine">
                          <td> 设定推送开始时间： </td>
                          <td><input name="startTime"  type="text" class="validate[length[1,50]] input" id="startTime" size="15" value="" />
                            <script type="text/javascript">
	 //开始时间
	 Calendar.setup({"ifFormat":"%Y-%m-%d %H:%M","firstDay":0,"showsTime":true,"showOthers":false,"timeFormat":24,"inputField":"startTime","button":"startTime"});
     </script>
&nbsp;&nbsp;</td>
                        </tr>
                        <tr class="dataLine">
                          <td> 设定推送结束时间： </td>
                          <td><input name="endTime" type="text" class="validate[length[1,50]] input"  id="endTime" size="15" value="" />
                               
     <script type="text/javascript">
	 //结束时间
	 Calendar.setup({"ifFormat":"%Y-%m-%d %H:%M","firstDay":0,"showsTime":true,"showOthers":false,"timeFormat":24,"inputField":"endTime","button":"endTime"});
     </script>
     
&nbsp;&nbsp;</td>
                        </tr>
                        <tr class="dataLine">
                          <td> 选择推送版本： </td>
                          <td><select name="version" id="version" class="validate[length[1,50]] input">
                          <option value="">选择版本号</option>
                          <?php foreach($this->versions as $v):?>
                         <option value="<?php echo $v['version'];?>"><?php echo $this->product['name'].' '.$v['version'];?></option>
                          <?php endforeach;?>
                          </select>
                          &nbsp;
                          <input type="hidden" name="changeVersionUrl" id="changeVersionUrl" value="<?php echo $this->projectUrl(array('action'=>'change-version')) ;?>" />
                          <input type="hidden" name="productCode" id="productCode" value="<?php echo $this->product['code'];?>" /></td>
                        </tr>
                        <tr class="dataLine">
                          <td> 选择跳转页面： </td>
                          <td><label>
                            <select name="redirPage" id="redirPage" class="validate[length[1,50]] input">
                              <option value="">请选择页面</option>
                              <option value="a" selected="selected">首页</option>
                              <option value="b">专题页</option>
                              <option value="c">活动页</option>
                              <option value="d">秒杀页</option>
                              <option value="e">商品详情页</option></select>
                          </label></td>
                        </tr>
                        <tr class="dataLine">
                          <td> 输入目标编号： </td>
                          <td><input name="targetNum" type="text" id="targetNum" size="30" /></td>
                        </tr>
                        <tr class="dataLine">
                          <td> 输入Push文字信息：<br />
                          （最多65个字符） </td>
                          <td><label></label><label>
                            <textarea name="msgInfo" id="msgInfo" class="validate[length[1,65]] input" cols="35" rows="5"></textarea>
                          </label></td>
                        </tr>
                        
                        <tr class="dataLine">
                            <td><input name="status" type="hidden" id="status" value="0" /></td>
                            <td>
                            <input type="hidden" name="backUrl" value="<?php echo $this->vars['backUrl'];?>" />
                            <input type="button" name="submitAuditBtn" id="submitAuditBtn" value="提交审核" class="button" onclick="submitAudit();" />
                            <input type="button" name="saveDraftBtn" id="saveDraftBtn" value="保存草稿" class="button" onclick="saveDraft();" />
                            <input type="reset" name="cancelBtn" id="cancelBtn" value="清空设置" class="button" />                            </td>
                        </tr>
                  </table>
              </form>
            </div>
        </div>
	</div>
    

     
<script language="javascript">
 //提交审核按钮
function submitAudit()
{
	$("#status").val(1);
	$("#editForm").submit();
}
//保存草稿按钮
function saveDraft()
{
	$("#status").val(2);
	$("#editForm").submit();
}
</script>
</body>
</html>